home *** CD-ROM | disk | FTP | other *** search
-
- dialer
-
- dialer <interface> [<dialer_file> [<seconds> [<pings> [<host>]]]]
-
- Set up an autodialer session for the interface. Whenever the
- interface is idle for the interval in <seconds>, the autodialer
- will ping the <hostid>. If there is no answer after <pings>
- attempts, the autodialer will execute the special commands
- contained in the <dialer_file>.
-
- If no <dialer_file> is specified, a previous dialer command
- process will be removed. If the number of <pings> is omitted, the
- <dialer_file> will be executed without first pinging the <host>.
-
- The file may have any valid name, and must be located in the NOS
- root directory. The dialer commands in the file are the
- following:
-
- >> Examples: dialer sl0 ns9tel.dia 30 10 ns9tel
-
-
- DIALER FILE COMMANDS
-
- control down|up
-
- Control the 'asy' interface. The 'down' option drops DTR and
- RTS. The 'up' option asserts DTR and RTS.
-
- >> Example: control down
-
-
-
- send "<string>" [<milliseconds>]
-
- This dialer command will write the specified string to the
- interface. The string quote marks are required, and the string
- may not contain embedded control characters. However, the
- standard C string escape sequences are recognized (but \0 should
- not be used). If <milliseconds> is specified, the <string>
- characters are sent with a <milliseconds> inter-character delay,
- useful for ancient Micom switches!
-
- >> Example: send "atdt555-1212"
-
-
-
- speed [ 115200|57600|38400|19200|9600|4800|2400|1200|300 ]
-
- This command sets the speed of the interface to one of the
- available speeds. If the speed is missing, the speed will be
- displayed in the dialer session window.
-
- >> Example: speed 1200
-
-
-
- wait <milliseconds> [ "test_string" ] [<speed>]
-
- If only the time is specified, the dialer pauses for the desired
- number of milliseconds. Otherwise, the dialer reads until the
- <test_string> is detected on the interface.
-
- If the string is not detected within the desired time, the
- autodialer will reset. The string quote marks are required, and
- the string may not contain embedded control characters. However,
- the standard C string escape sequences are recognized (but \0
- should not be used).
-
- If the <speed> parameter is specified, the dialer will continue
- to read characters until a non-digit is detected. The string
- read is converted to an integer, and used to set the interface
- speed. If the trailing non-digit is not detected within the
- desired time, or the integer value is not a valid speed, the
- autodialer will reset.
-
- >> Example: wait 45000 "CONNECT" 1200
-
-
- DIALER FILE EXTENDED COMMANDS
-
-
- failmode [ on | OFF ]
-
- 'failmode' establishes whether the dialer should continue after
- a failed dialer command. <off> implies abort the dialing script,
- while <on> means continue the script, which in effect enables
- the 'ifok' and 'iffail' commands.
-
-
- begin
-
- 'begin' starts a block of commands.
-
-
- end
-
- 'end' terminates a block of commands, which extends to the
- previous unpaired 'begin'.
-
-
- exit [<return_code>]
-
- 'exit' ends the dialer script, with the result code set to that
- of the previous dialer command unless <return_code> is specified.
-
-
- status [ up | down ]
-
- 'status' is similar to the 'control' command, except that the
- iostatus() routine is notified.
-
-
- ifok <cmd>
-
- 'ifok' invokes the dialer command <cmd> if the previous command
- was successful.
-
-
- iffail <cmd>
-
- 'iffail' invokes the dialer command <cmd> if the previous command
- was not successful.
-
-
- DIALER EXAMPLE FILE
-
- The following dialer script will perform these steps:
- . drop DTR & RTS to force a hangup
- . wait 2 seconds and then raise DTR & CTS
- . set the port speed to 9600 baud and initialize the modem
- . dial a number and wait for the modem to return a CONNECT message
- . (abort if the dial-out was unsuccessful)
- . turn on continue-after-error mode
- . try three times to send a CR and obtain a Login: prompt
- . send my login name, password, wait 5 seconds and then exit
-
- control down
- wait 2000
- control up
- speed 9600
- send "atz\ratm0l0e0\r"
- wait 1000
- send "atdt555-1212\r"
- wait 45000 "CONNECT"
- wait 2000
- failmode on
- send "\r"
- wait 5000 "ogin"
- iffail begin
- send "\r"
- wait 5000 "ogin"
- iffail begin
- send "\r"
- wait 5000 "ogin"
- end
- end
- wait 1000
- send "myname\r"
- wait 5000 "assword"
- wait 1000
- send "mypassword\r"
- wait 5000
- exit
-